\documentclass[12pt,a4paper,oneside]{book}

\usepackage[left=3.5cm,top=2.5cm,right=2.5cm,bottom=2.5cm]{geometry} %margins
\usepackage{amsthm} % theorem environment
\usepackage{amsmath} % math
\usepackage{amssymb} % symbols
\usepackage{graphics} % for including figures
\usepackage{graphicx} % for including figures
\usepackage{setspace} % for doublespacing singlespacing etc.
\usepackage{datetime} % to write the date in the desired format
\usepackage[title, titletoc]{appendix}
\usepackage{subfigure}
\usepackage{algorithm}
\usepackage{algorithmic}
% \usepackage{algorithmicx}
% \usepackage{algpseudocode}
\usepackage{float}
\usepackage{listings}
\usepackage{framed}
\usepackage{multirow}
\usepackage[square, numbers, comma, sort&compress]{natbib}
\usepackage{hyperref}
\usepackage{fixltx2e}
\usepackage{url}
\usepackage{pdfpages}

\theoremstyle{definition}
\newtheorem{example}{Example}
\newtheorem{definition}{Definition}

\graphicspath{{img/}}

\pagestyle{myheadings} 

% % % % % % % % % % % % % % % % %

%all this for generating title and certificate
\newdateformat{monthyear}{\monthname[\THEMONTH], \THEYEAR}
\def\title{Improving GCC Retargetability}
\def\subtitle{Extraction of Machine Independent RTL patterns from GCC's Machine Description Files}
\def\author{Saravana Perumal P}
\def\rollno{10111033}
\def\degree{Master of Technology}
\def\department{Department of Computer Science and Engineering}
\def\shortdepartment{CSE}
\def\institute{Indian Institute of Technology Kanpur}
\def\shortinstitute{I.I.T. Kanpur}
\def\longinstitute{Indian Institute of Technology, Kanpur}
\def\advisor{Prof. Amey Karkare}
\def\advisordepartment{Department of Computer Science and Engineering}

% % % % % % % % % % % % % % % % % 

\hypersetup{
	bookmarks=true,
	bookmarksopen=true,
	bookmarksopenlevel=0,
	bookmarksnumbered=true,
	hypertexnames=false,
	colorlinks=true,
	linkcolor={black},
	citecolor={black},
	urlcolor={black},
	breaklinks=true,
	pdfauthor={\author},
	pdftitle={\title}
}


\begin{document}
	\frontmatter
	\thispagestyle{empty}
	\include{title}
	\thispagestyle{empty}
% 	\include{certificate}
        \includepdf{certificate0001.pdf}
	%\pagestyle{myheadings} 
	\pagenumbering{roman} 
	\pagestyle{plain}
	\setcounter{page}{2}
	\addcontentsline{toc}{chapter}{Abstract}
	
	\onehalfspace
	\include{abstract}
	\include{Dedication}
	\include{acknowledgement}
	
	\doublespacing
	\setcounter{tocdepth}{1}
	\tableofcontents
	
	\listoftables
	\addcontentsline{toc}{chapter}{List of Tables}
	
	\listoffigures
	\addcontentsline{toc}{chapter}{List of Figures}
	
	\mainmatter
	\doublespacing
	\pagenumbering{arabic}
	\pagestyle{myheadings}
	
	\include{Introduction}
	\input{Background}
        \input{Methodology}
        \input{Results}
        \input{Related}
        \input{Conclusion}
        \appendix
        \input{User_Manual}
        \input{Results2} 
	\backmatter
	\singlespacing
	\addcontentsline{toc}{chapter}{Bibliography}
	%\bibliographystyle{unsrt}
%         \bibliographystyle{alpha}
	\bibliographystyle{plain}
	\bibliography{references}

\end{document}